#ifndef __VM_VOLUME__
#define __VM_VOLUME__

#include "directory.h"

namespace xm
{
	class volume_t : public directory_t
	{
	protected:
		char				drive[4];		// c:\0\0
	public:
		enum { KoClass = KoVolume };
		STDMETHOD_(KernelObjectClass,Class)() { return KoVolume; };
		volume_t( char ch = 0 )
		{
			drive[0] = ch;
			drive[1] = ':';
			drive[2] = 0;
			drive[3] = 0;
		}
		directory_t * get_root()
		{
			return this;
		}
		long set_driver( char ch )
		{
			if( isalpha(ch) )
				drive[0] = ch;
			else
				return E_FAIL;
			return S_OK;
		}
		const char * get_dos_name()
		{
			if( !drive[0] ) return 0;
			return drive;
		}
		
	

	};
};


#endif